// import 'ant-design-vue/dist/antd.css' // or 'ant-design-vue/dist/antd.less'
import '@/assets/style/global.less'

// import { DatePicker } from 'ant-design-vue'
import Antd, { message, notification } from 'ant-design-vue'
import * as AntdIcon from '@ant-design/icons-vue'
import { createFromIconfontCN } from '@ant-design/icons-vue'

// 注册远程 icon
const Icon = createFromIconfontCN({
  // 在 iconfont.cn 上生成
  // scriptUrl: '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js', 
  // 离线本地的
  scriptUrl: '/public/font_50n1jdkxvr/iconfont.js' 
})
// 防止弹出大量消息
message.config({
  top: '10px',
  duration: 3,
  maxCount: 10,
  rtl: false
  // prefixCls: 'my-message',
})

// 写配置//一些参你也可以配置到动态的，看个人需要
notification.config({
  placement: 'topRight', // bottomRight
  top: '50px',
  duration: 3
})

// setup i18n instance with glob
export function setupAntd (app) {
  app.use(Antd)
  for (const c in AntdIcon) {
    app.component(c, AntdIcon[c])
  }
  app.component('DIconFont', Icon)
}
